/* ONLINE APPENDIX */

/* Table 1 */
proc freq data=citizens ; tables vignette;
proc freq data=companies; tables vignette; 

/* Table A1 Overview of dependent, independent and control variables */
proc means data=citizens mean std min max maxdec=2;
 var nmeanprocedure nmeandecision Left_Right IGMean;
proc means data=companies mean std min max maxdec=2;
 var nmeanprocedure nmeandecision Left_Right IGMean;

/* Table A2 and Table A3 */
/* Table A2 */
proc glm data=citizens ; class vignette; model control1 = vignette; 
proc glm data=citizens ; class vignette; model control2 = vignette; 
proc glm data=companies; class vignette; model control1 = vignette; 
proc glm data=companies; class vignette; model control2 = vignette;

proc means data=citizens  mean std maxdec=2; var control1; class vignette;
proc means data=citizens  mean std maxdec=2; var control2; class vignette;
proc means data=companies mean std maxdec=2; var control1; class vignette;
proc means data=companies mean std maxdec=2; var control2; class vignette;

/* Table A3 */
proc freq data=citizens ; tables (profession gender education)*vignette/chisq;
proc freq data=companies; tables (gender education)*vignette/chisq;	

proc glm  data=citizens ; class vignette; model TrustMean  = vignette;
proc glm  data=companies; class vignette; model TrustMean  = vignette;

proc glm  data=citizens ; class vignette; model Internalmean = vignette;  
proc glm  data=companies; class vignette; model Internalmean = vignette;  

proc glm  data=citizens ; class vignette; model ExternalMean = vignette; 
proc glm  data=companies; class vignette; model ExternalMean = vignette; 

proc glm  data=citizens ; class vignette; model IGMean = vignette;
proc glm  data=companies; class vignette; model IGMean = vignette; 

proc glm  data=citizens ; class vignette; model age = vignette;	  
proc glm  data=companies; class vignette; model age = vignette;	run;

/* with control variables online appendix. Table A4 */
/*individual citizens/procedure */
proc glm data=citizens; class vignette(ref='1'); model nmeanprocedure=vignette nLeft_Right nIGMean/solution clparm;  
/* company leaders/procedure */
proc glm data=companies; class vignette(ref='1'); model nmeanprocedure=vignette nLeft_Right/solution clparm;  
/* individual citizens/decision */
proc glm data=citizens; class vignette(ref='1'); model nmeandecision=nLeft_Right vignette nIGMean/solution clparm;  
/* company leaders/decision */
proc glm data=companies; class vignette(ref='1'); model nmeandecision=vignette nLeft_Right/solution clparm;  

/* testing whether slopes are statistically different from each other, Table A5 */
/* we need to run the statements for Model VI */
proc glm data=predict; 
 class acceproc;
 model Decision_Acceptance_Predicted=acceproc/solution;
/* Part B */
proc sort data=predict; by lr;
proc glm data=predict; class acceproc(ref='Low') lr; 
  model nmeandecision=acceproc/solution; by lr;
  lsmeans acceproc / e;
  contrast 'medium versus high' acceproc -1 1  0;
  contrast 'medium versus low ' acceproc  0 1 -1;
  contrast 'low versus high   ' acceproc -1 0  1;
/* part A */
proc freq;
 tables lr*acceproc lr*decision/chisq;

proc glm data=predict; class acceproc(ref='Low') lr; model nmeandecision=acceproc/solution; where lr=2;
proc glm data=predict; class acceproc(ref='Low') lr; model nmeandecision=acceproc/solution; where lr=3;

proc means mean lclm uclm data=predict; var Decision_Acceptance_Predicted; class acceproc lr; run; 

/* TABLE A6. WELCH ANOVA */
/* MODEL I: individual citizens/procedure */
proc glm data=citizens plots(only)=diagnostics(unpack); 
 class vignette(ref='1'); 
 model nmeanprocedure=vignette/solution effectsize alpha=0.05;  
 means vignette/hovtest welch;

/* MODEL II: company leaders/procedure */
proc glm data=companies plots(only)=diagnostics(unpack); 
 class vignette(ref='1'); 
 model nmeanprocedure=vignette/solution effectsize;  
 lsmeans vignette / e  adjust=tukey;;
 means vignette/hovtest welch;

/* MODEL III: individual citizens/decision */
proc glm data=citizens plots(only)=diagnostics(unpack);
 class vignette(ref='1'); 
 model nmeandecision=vignette/solution effectsize;  
 lsmeans vignette / e;
 means vignette/hovtest welch;

/* MODEL IV: company leaders/decision */
proc glm data=companies plots(only)=diagnostics(unpack);; 
 class vignette(ref='1'); 
 model nmeandecision=vignette/solution;  
 lsmeans vignette / e;
 means vignette/hovtest welch;

/* Table A8. Models reported in TABLE 3 with robust SE*/
/* creating dummy-variables for the vignette */
data citizens; set citizens;
 if vignette eq 2 then dum1 = 1; else dum1=0;
 if vignette eq 3 then dum2 = 1; else dum2=0;
 if vignette eq 4 then dum3 = 1; else dum3=0;
 if vignette eq 5 then dum4 = 1; else dum4=0;

data companies; set companies;
 if vignette eq 2 then dum1 = 1; else dum1=0;
 if vignette eq 3 then dum2 = 1; else dum2=0;
 if vignette eq 4 then dum3 = 1; else dum3=0;
 if vignette eq 5 then dum4 = 1; else dum4=0;

proc reg data=citizens;  model nmeanprocedure=dum1-dum4/spec white;
proc reg data=citizens;  model nmeandecision =dum1-dum4/spec white;
proc reg data=companies; model nmeanprocedure=dum1-dum4/spec white;
proc reg data=companies; model nmeandecision =dum1-dum4/spec white;

/*Table A9. Models reported in TABLE 3 with robust SE */
data citizens; set citizens; nmeanprocedure_nLeft_Right=nmeanprocedure*nLeft_Right;
proc reg data=citizens;
 model nmeandecision =nmeanprocedure nLeft_Right/spec white;
proc reg data=citizens;
 model nmeandecision =nmeanprocedure nLeft_Right nmeanprocedure_nLeft_Right/white spec;
data companies; set companies; nmeanprocedure_nLeft_Right=nmeanprocedure*nLeft_Right;
proc reg data=companies;
 model nmeandecision =nmeanprocedure nLeft_Right/white spec;
proc reg data=companies;
 model nmeandecision =nmeanprocedure nLeft_Right nmeanprocedure_nLeft_Right/white spec;

run;
